package com.learner.course.service.impl;

import com.learner.course.mapper.CourseCateMapper;
import com.learner.course.repository.CourseCategoryRepository;
import com.learner.course.service.CourseCateService;
import com.learner.common.util.Result;
import com.learner.pojo.course.Category;
import com.learner.pojo.course.expand.CategoryNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: 课程基础信息逻辑
 * @Author: ice2020x
 * @Date: 2021/8/22
 */
@Service
public class CourseCateServiceImpl implements CourseCateService {

    @Autowired
    private CourseCateMapper courseCateMapper;

    @Autowired
    private CourseCategoryRepository courseCategoryRepository;


    @Override
    public CategoryNode selectCateList() {
        return courseCateMapper.selectList();
    }


    @Override
    public Category saveCate(Category category) {
        return courseCategoryRepository.save(category);
    }
}
